<template>
  <el-row>
    <el-col :span="6">
      <div class="columm">
        <span>转换总额</span>
        <span>{{ totalTransformation }}</span>
      </div>
    </el-col>
    <el-col :span="6">
      <div class="columm">
        <span>转账总额</span>
        <span>{{ totalZhuanzhang }}</span>
      </div>
    </el-col>
    <el-col :span="6">
      <div class="columm">
        <span>提现总额</span>
        <span>{{ totalTixian }}</span>
      </div>
    </el-col>
    <el-col :span="6">
      <div class="columm">
        <span>变动总额</span>
        <span>{{ totalValue }}</span>
      </div>
    </el-col>
  </el-row>
</template>
<script>
import { queryYkgfc } from "@/api/ds/user";

export default {
  components: {},
  props: {
    queryParams: {
      type: Object,
    },
    ctime: {
      type: [Array, String],
    },
  },
  data() {
    return {
      // 转换
      totalTransformation: 0,
      // 转账
      totalZhuanzhang: 0,
      // 提现
      totalTixian: 0,
      // 总值
      totalValue: 0,
    };
  },
  computed: {},
  watch: {},
  created() {},
  methods: {
    async statusQuery() {
      let q1 = this.addDateRange(this.queryParams, this.ctime, "");
      //   q1.detailed = "转换";
      let res = await queryYkgfc({ ...q1, detailed: "转换" });
      if (res.code === 200) {
        this.totalTransformation = res.rows[0];
      }

      let q2 = this.addDateRange(this.queryParams, this.ctime, "");
      //   q2.detailed = "转账";
      let res2 = await queryYkgfc({ ...q2, detailed: "转账" });
      if (res2.code === 200) {
        this.totalZhuanzhang = res2.rows[0];
      }

      let q3 = this.addDateRange(this.queryParams, this.ctime, "");
      //   q3.detailed = "提现";
      let res3 = await queryYkgfc({ ...q3, detailed: "提现YKGFC地址" });
      if (res3.code === 200) {
        this.totalTixian = res3.rows[0];
      }

      let q4 = this.addDateRange(this.queryParams, this.ctime, "");
      //   q4.detailed = null;

      let res4 = await queryYkgfc({ ...q4, detailed: "" });
      if (res4.code === 200) {
        this.totalValue = res4.rows[0];
      }
    },
  },
  mounted() {},
  beforeCreate() {},
  beforeMount() {},
  beforeUpdate() {},
  updated() {},
  beforeDestroy() {},
  destroyed() {},
  activated() {},
  deactivated() {},
};
</script>
<style lang="scss" scoped>
.columm {
  width: 100%;
  color: #333333;
  font-weight: 600;
  padding: 20px;

  display: flex;
  flex-flow: column nowrap;
  justify-content: flex-start;
  align-items: center;
}
</style>
